package com.chuangsi.project.admin.dto.app.esign;


import com.chuangsi.project.admin.dto.esign.ResEsginFileListDto;
import com.chuangsi.project.admin.dto.esign.ResResponseDataDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wangshengming
 * @date 2023/4/7
 */
@Data
public class ResESignDownloadDto extends ResResponseDataDto {

    @ApiModelProperty(value = "data")
    private ResData data;

    @Data
    public static class ResData {

        @ApiModelProperty(value = "文件集合")
        private List<ResEsginFileListDto> files;
    }


    public static ResESignDownloadDto getSimpleDownload(String url){
        ResESignDownloadDto resESignDownloadDto = new ResESignDownloadDto();
        ResData resData = new ResData();
        List<ResEsginFileListDto> files = new ArrayList<>();
        ResEsginFileListDto resEsginFileListDto = new ResEsginFileListDto();
        resEsginFileListDto.setDownloadUrl(url);
        files.add(resEsginFileListDto);
        resData.setFiles(files);
        resESignDownloadDto.setData(resData);
        return resESignDownloadDto;
    }
}
